<template>
  <div class="TThreeTitle" v-bind="$attrs">
    <div class="common-three-bg flex items-center justify-between">
      <div class="flex items-center">
        <div class="common-three-title"></div>
        <span v-if="isDot" class="isDot"></span>
        {{ title }}
      </div>
      <svg-icon
        :name="visible ? 'ic-arrow-up' : 'ic-arrow-down'"
        class="mr-[8px]"
        :style="{ width: '16px', height: '16px' }"
        @click="visible = !visible"
      />
    </div>
    <el-collapse-transition>
      <slot v-if="visible" name="content"></slot>
    </el-collapse-transition>
  </div>
</template>

<script>
export default {
  name: "TThreeTitle",
  props: {
    title: {
      type: String,
      require: true,
      default: "",
    },
    isDot: {
      type: Boolean,
      require: false,
      default: false,
    },
  },
  data() {
    return {
      visible: true,
    };
  },
};
</script>
